var now=0;
//自动改变图片
function autoChangeImage(){
    setInterval(function(){
    	now++;
    	if(now>4)
    		now=0;
    	changeImage(now);
    }, 5000);
}
//改变图片方法
function changeImage(idNum){
    switch(idNum){
        case 0:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-0.jpg";
            now=0;//改变首页图片
            break;
        case 1:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-1.jpg";
            now=1;
            break;
        case 2:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-2.jpg";
            now=2;
            break;
        case 3:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-3.jpg";
            now=3;
            break;
        case 4:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-4.jpg";
            now=4;
            break;
    }
}
function icon_left()
{
	 switch(now){
        case 0:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-4.jpg";
            now=4;
            break;
        case 1:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-0.jpg";
            now=0;
            break;
        case 2:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-1.jpg";
            now=1;
            break;
        case 3:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-2.jpg";
            now=2;
            break;
        case 4:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-3.jpg";
            now=3;
            break;
    }
}
function icon_right()
{
	 switch(now){
        case 0:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-1.jpg";
            now=1;
            break;
        case 1:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-2.jpg";
            now=2;
            break;
        case 2:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-3.jpg";
            now=3;
            break;
        case 3:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-4.jpg";
            now=4;
            break;
        case 4:
            document.getElementById("carousel-img").src = "/Public/Home/images/carousel-0.jpg";
            now=0;
            break;
    }
}